import { IShareAble } from "../IShareAble";


export class TTShare extends IShareAble{

   shareVideo(data: string | any[], caller?: any, onSuccess?: Function, onFail?: Function): void {
      if(data){
            window['tt'].shareAppMessage({
               title: data[0],
               channel: "video",
               extra: {
                  videoTopics: data[1],
                  hashtag_list: data[1],
                  video_title: data[0],
                  videoPath: data[2],
                  withVideoId: true,
               },
               success: (res) => {
                  onSuccess && onSuccess.apply(caller);
               },
               fail(e) {
                  onFail && onFail.apply(caller, e);
               },
            });
      }
   }
}
